package cn.lg.soar.boot.fc.entity;

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

import cn.lg.soar.database.base.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * 流程应用表
 * @author ZhuanZ（无密码）
 * @since 2025-01-09
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ExcelIgnoreUnannotated
@Getter
@Setter
@Accessors(chain = true)
@Data
@ApiModel(value = "Process", description = "流程应用表")
@TableName("fc_process")
public class Process extends BaseEntity {

    /** 应用ID */
    @NotNull(message = "主键不能为空", groups = { Update.class })
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 应用名称 */
    @NotBlank(message = "应用名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "应用名称")
    @ApiModelProperty(value = "应用名称")
    private String applicationName;

    /** 流程名称 */
    @NotBlank(message = "流程名称不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "流程名称")
    @ApiModelProperty(value = "流程名称")
    private String processName;

    /** 原表单收集ID */
    @ExcelProperty(value = "原表单收集ID")
    @ApiModelProperty(value = "原表单收集ID")
    private Long collectId;

    /** 审核类型(0-其他 1-租房审核 2-退房审核 3-维修审核 4-转租审核 5-用户审核) */
    @NotNull(message = "审核类型不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "审核类型(0-其他 1-租房审核 2-退房审核 3-维修审核 4-转租审核 5-用户审核)")
    @ApiModelProperty(value = "审核类型(0-其他 1-租房审核 2-退房审核 3-维修审核 4-转租审核 5-用户审核)")
    private Integer examineType;

    /** 排序 */
    @NotNull(message = "排序不能为空", groups = { Create.class, Update.class })
    @ExcelProperty(value = "排序")
    @ApiModelProperty(value = "排序")
    private Integer orders;

    /** 状态 */
    @ExcelProperty(value = "状态")
    @ApiModelProperty(value = "状态")
    private String status;

    /** 扩展字段1 */
    @ApiModelProperty(value = "扩展字段1")
    private String extend1;

    /** 扩展字段2 */
    @ApiModelProperty(value = "扩展字段2")
    private String extend2;

    /** 扩展字段3 */
    @ApiModelProperty(value = "扩展字段3")
    private String extend3;

    /** 乐观锁 */
    @ApiModelProperty(value = "乐观锁")
    private Integer version;

    @JsonIgnore
    @Override
    public Long primaryKey() {
        return this.id;
    }

}
